package com.boyunv.observer.example01;
/*
 *@description
 *
 *@author boyunv
 *@create 2023/8/11 7:45
 *@version 1.0
 */

public class Client {
    public static void main(String[] args) {
        //创建目标类
        Subject subject=new ConcreteSubject();
        //注册观察者
        subject.attach(new ConcreteObserver1());
        subject.attach(new ConcreteObserver2());
        //具体主题内部发生改变,给所有注册的观察者发送通知
        subject.notifyObservers();
    }
}
